< previous page page_105 next page >

Page 105
Once this is done, add a few buttons to the toolbars. Once the Toolbar controls are associated with the bands on the coolbar, you have finished the setup. Now, run the application and try opening and closing the bands as shown in Figure 4.15.
12181-0105a.gif
Figure 4.15.
Setting a menu list for the toolbar.
The only thing you have left to do is add the code for each of the command buttons. As you can see, this new control allows you to enhance your application so that it works very much like any other Microsoft application. This gives the user a very comfortable feeling when learning to use your application.
Adding Menus
Now that you've created a toolbar for your application, you then need to add a menu to provide a way for users to select many of the common functions easily. In most applications, you usually have file functions that let users create, edit, and save files. You also have edit functions that allow users to move data around. Then there are the functions for specific tasks in your application. For example, an application that I've written has functions for handling pilot information, aircraft data, and log entry functions. In other words, lots of things users can do.
One of the most important things in any application is allowing users to easily access all its functions. Users are accustomed to accessing most functions with a single mouse click. Also, most users want all the functions located conveniently in one place. To handle this in your application, use toolbars and menus. Visual Basic lets you quickly and easily create menus with the Menu Editor, with which you can create menu bars located at the top of a form, or pop-up menus that users typically access by right-clicking.
Creating an Application Menu
In creating any type of menu system for an application, you must first determine what functions you want or need to put on the menu and how you want to organize these functions. By looking at VB's main menu, you can see that certain functions are organized into groups of similar items (see Figure 4.16).

 
< previous page page_105 next page >

If you like this book, buy it!